﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shop.Master" AutoEventWireup="true" CodeBehind="VisualizarPedido.aspx.cs" Inherits="ShopNet.VisualizarPedido" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">

<div id="content_top"></div>
<div id="content_middle">
    <h3>Pedido: <asp:Literal ID="lNumPedido" runat="server" ></asp:Literal></h3>
    <fieldset>
        <legend>Dados do Pedido</legend>
        <div class="grid-4-12" >
            <p><label class="info-label">Status Pedido:</label></p>
            <p><asp:Label ID="lStatusPedido" runat="server" ></asp:Label></p>
        </div>
        <div class="grid-4-12" >
            <p><label class="info-label">Data Pedido:</label></p>
            <p><asp:Label ID="lDataPedido" runat="server" ></asp:Label></p>
        </div>
        <div class="grid-4-12" >
            <p><label class="info-label">Data Status Pedido:</label></p>
            <p><asp:Label ID="lDataStatus" runat="server" ></asp:Label></p>
        </div>
    </fieldset>

    <p>&nbsp;</p>
    <fieldset>
        <legend>Produtos</legend>
        <div class="grid-12-12 table">
        <asp:GridView ID="gvCesta" runat="server" AutoGenerateColumns="False" 
            ShowFooter="true" CssClass="tbl" 
            onrowdatabound="gvCesta_RowDataBound"  >
            <HeaderStyle CssClass="table-head" />
            <FooterStyle CssClass="total" />
        <Columns>        
            <asp:TemplateField HeaderText="Produto">
                <ItemTemplate>
                    <asp:HyperLink ID="hlProduto" runat="server" ></asp:HyperLink>
                </ItemTemplate>            
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Quantidade" ItemStyle-Width="10%">
                <ItemTemplate>
                    <asp:Label ID="lQtde" runat="server" Text='<%#Bind("Quantidade") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Qtde por unid.">
                <ItemTemplate>
                    <asp:Literal ID="lQtdeCadaPacote" runat="server" Text='<%#Bind("Produto.QtdeCadaPacote") %>'></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Preço Unitário">
                <ItemTemplate>
                    <asp:Label ID="lPrecoUnitario" runat="server"></asp:Label>
                </ItemTemplate>
                <FooterTemplate>Total:</FooterTemplate>            
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Total">
                <ItemTemplate>
                    <asp:Label ID="lTotalCarrinho" runat="server" ></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    R$ <%=GetValorTotalPedido() %>
                </FooterTemplate>
            </asp:TemplateField>
        </Columns>    
        </asp:GridView>
            
        </div>
    </fieldset>
    <p>&nbsp;</p>
    <fieldset>
        <legend>Endereço</legend>
        <div class="grid-6-12">
        <p><label class="info-label">Rua/Av.:<em class="product_box_unavaible_color">*</em></label></p>
        <p><asp:Literal ID="lEndereco" runat="server"></asp:Literal></p>
        </div>
        <div class="grid-3-12">
        <p><label class="info-label">Número:</label></p>
        <p><asp:Literal ID="lNumero" runat="server"></asp:Literal></p>
        </div>
        <div class="grid-3-12">
        <p><label class="info-label">Complemento:</label></p>
        <p><asp:Literal ID="lComplemento" runat="server"></asp:Literal></p>
        </div>
        <div class="grid-4-12">
        <p><label class="info-label">Bairro:</label></p>
        <p><asp:Literal ID="lBairro" runat="server"></asp:Literal></p>
        </div>
        <div class="grid-4-12">
        <p><label class="info-label">Estado:<em class="product_box_unavaible_color">*</em></label></p>
        <p><asp:Literal ID="lEstado" runat="server"></asp:Literal></p>
        </div>
        <div class="grid-8-12">
        <p><label class="info-label">Cidade:<em class="product_box_unavaible_color">*</em></label></p>
        <p><asp:Literal ID="lCidade" runat="server"></asp:Literal></p>
        </div>
        <div class="grid-8-12">
        <p><label class="info-label">C.E.P.:<em class="product_box_unavaible_color">*</em></label></p>
        <p><asp:Literal ID="lCep" runat="server"></asp:Literal></p>
        </div>
        
    </fieldset>
</div>
<div id="content_bottom"></div>

</asp:Content>
